package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @description 商品信息
 */
public interface GoodsDao {


    String getMaxCode();


    List<Goods> findPageByQueryGoods(@Param("size") Integer size,
                                     @Param("limit") Integer limit,
                                     @Param("codeOrName") String codeOrName,
                                     @Param("goodsTypeIds") Object[] goodsTypeIds,
                                     @Param("str")String str);

    Integer getTotal(@Param("codeOrName") String codeOrName,
                     @Param("goodsTypeIds") Object[] goodsTypeIds,
                     @Param("str")String str);

    void update(@Param("goods") Goods goods);

    void save(@Param("goods") Goods goods);

    Integer delete(@Param("goodsId") Integer goodsId);

    Integer updateInventory(@Param("goodsId") Integer goodsId,
                            @Param("inventoryQuantity") Integer inventoryQuantity,
                            @Param("purchasingPrice") double purchasingPrice);

    List<Goods> listAlarm();
}
